﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public class TeleportEffectPrioritizedFollowPosition : PrioritizedFollowPosition
{
    private TeleportationManager teleportationManager = null;

    public TeleportEffectPrioritizedFollowPosition(TeleportationManager teleportationManager)
    {
        this.teleportationManager = teleportationManager;
    }

    public override void Update(float time)
    {
        if (!teleportationManager.IsDestroyed)
        {
            Position = teleportationManager.transform.position;
            Priority = PrioritizedFollowPosition.TELEPORT_EFFECT;
        }
        else
        {
            Priority = PrioritizedFollowPosition.EXPIRED;
        }
    }
}
